package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.OrderSmsMapper;
import com.qj.yantaishan.domain.OrderSms;
import com.qj.yantaishan.service.IOrderSmsService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 短信订单Service业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class OrderSmsServiceImpl    extends ServiceImpl<OrderSmsMapper, OrderSms>  implements IOrderSmsService
{
    @Autowired
    private OrderSmsMapper orderSmsMapper;

    /**
     * 查询短信订单
     * 
     * @param smsOrderId 短信订单主键
     * @return 短信订单
     */
    @Override
    public OrderSms selectOrderSmsBySmsOrderId(Long smsOrderId)
    {
        return orderSmsMapper.selectOrderSmsBySmsOrderId(smsOrderId);
    }

    /**
     * 查询短信订单列表
     * 
     * @param orderSms 短信订单
     * @return 短信订单
     */
    @Override
    public List<OrderSms> selectOrderSmsList(OrderSms orderSms)
    {
        return orderSmsMapper.selectOrderSmsList(orderSms);
    }

    /**
     * 新增短信订单
     * 
     * @param orderSms 短信订单
     * @return 结果
     */
    @Override
    public int insertOrderSms(OrderSms orderSms)
    {
        return orderSmsMapper.insertOrderSms(orderSms);
    }

    /**
     * 修改短信订单
     * 
     * @param orderSms 短信订单
     * @return 结果
     */
    @Override
    public int updateOrderSms(OrderSms orderSms)
    {
        return orderSmsMapper.updateOrderSms(orderSms);
    }

    /**
     * 批量删除短信订单
     * 
     * @param smsOrderIds 需要删除的短信订单主键
     * @return 结果
     */
    @Override
    public int deleteOrderSmsBySmsOrderIds(String smsOrderIds)
    {
        return orderSmsMapper.deleteOrderSmsBySmsOrderIds(Convert.toStrArray(smsOrderIds));
    }

    /**
     * 删除短信订单信息
     * 
     * @param smsOrderId 短信订单主键
     * @return 结果
     */
    @Override
    public int deleteOrderSmsBySmsOrderId(Long smsOrderId)
    {
        return orderSmsMapper.deleteOrderSmsBySmsOrderId(smsOrderId);
    }
}
